package AbstractTest;

public class Dog extends Animal{
    private String male;

    public Dog(String name, int age, String male) {
        super(name, age);
        setMale(male);
    }

    @Override
    public void eat() {
        super.eat();
    }

    @Override
    public double sleep(double hour) {
        return super.sleep(hour);
    }

    public void setMale(String male){
        this.male = male;
    }


    public static void main(String[] args) {
        Dog dog = new Dog("狗",7,"雄性");
        double sleep = dog.sleep(4);
        System.out.println(sleep);
        dog.eat();
        String male = dog.getMale();
        System.out.println(male);

    }

    public String getMale() {
        return male;
    }
}


